package com.scyshkj.university.wechat.pay;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.scyshkj.university.wechat.utils.ParameterToMap;
import lombok.Data;

/**
 * Created by 唐旭 on 2016/11/20.
 */
@Data
public class WechatAccessTokenParameter implements ParameterToMap {
    private String appid;
    private String secret;
    private String code;
    @JsonProperty("grant_type")
    private String grantType;

    public WechatAccessTokenParameter() {

    }

    public WechatAccessTokenParameter(WechatProperties properties, String code) {
        this.appid = properties.getAppid();
        this.secret = properties.getSec();
        this.code = code;
        this.grantType = "authorization_code";
    }

}
